package Exercise;

public class exercise7 {
	public static void main(String[] args) {
		String binaryString = toBinaryString(6);
		System.out.println(binaryString);
	}
	
	public static String toBinaryString(int number){
		StringBuilder sb = new StringBuilder();
		while(true){
			if(number ==0){
				break;
			}
			int remaindar = number %2;
			sb.insert(0, remaindar);
			number = number /2;
		}
		return sb.toString();
	}
}
